# -*- coding: utf-8 -*-

from gluon.contrib.populate import populate
from gluon.tools import *
from gluon.custom_import import track_changes
from domain.dal2 import DAL2

####### Track changes
#(carga automaticamente los cambios hechos en los modulos)
track_changes(True)

from domain.config import *

####### DEFINICION DEL IDIOMA
T.force('es-es')




####### SETEA TEST Y LOCAL
TEST = True
LOCAL = False #BASE DE DATOS LOCAL

####### BASES DE DATOS #######
if TEST == False:
    pass

elif LOCAL == False:
    dbSIGECON = DAL2('mssql3://sa:password@larry/GestionConsultas', pool_size = 10, db_codec='Latin-1')
    dbDatosComunes = DAL2('mssql3://sa:password@larry/DatosComunes', pool_size = 10, db_codec='Latin-1')
    dbAfiliaciones = DAL2('mssql3://sa:password@larry/Afiliaciones', pool_size = 10, db_codec='Latin-1')

elif LOCAL == True:
#    estaria bueno para cuando no hay red :)
    pass










#    mysql => no se usa mas
#    import MySQLdb
#    from gluon.dal import MySQLAdapter
#    MySQLAdapter.adapter = MySQLdb 

#    dbSIGECON = DAL2('mssql://sa:Cjo07#5@10.0.10.101/GestionConsultas', pool_size=10, db_codec='LATIN-1', driver_args = {'DRIVER':'FreeTDS'})
#    dbAfiliaciones = DAL2('mssql://sa:Cjo07#5@10.0.10.101/Afiliaciones', pool_size=10, db_codec='LATIN-1', driver_args = {'DRIVER':'FreeTDS'})
#    dbDatosComunes = DAL2('mssql://sa:Cjo07#5@10.0.10.101/DatosComunes', pool_size = 10, db_codec='LATIN-1', driver_args = {'DRIVER':'FreeTDS'})
    

#    dbSIGECON = DAL2('mysql://usrw2py:Eh_QfEw2P@10.0.10.110/GestionConsultas', pool_size = 10)   











